package com.example.demo.mapper;

import com.example.demo.entity.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface CommentsMapper {
    List<Comment> getAllComments();
    List<Comment> getCommentsByOrderId(Long orderId);
    List<Comment> getCommentsByUserId(Long userId);
    Comment getCommentsByUserIdAndOrderId(Long userId,Long orderId);
    void deleteCommentByCommentId(Long commentId);
    void deleteCommentByUserIdAndOrderId(Long userId,Long orderId);
    void newComment(Comment comment);
}

